/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task12.task1201;

/* 
鲸鱼和奶牛
*/

public class Solution {

    public static void main(String[] args) {
        Cow cow = new Whale();

        System.out.println(cow.getName());
    }

    public static class Cow {
        public String getName() {
            return "我是一头牛";
        }
    }

    public static class Whale extends Cow {

        @Override
        public String getName() {
            return "我不是奶牛。我是一条鲸鱼。";
        }
    }
}
